﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NUnit.Framework;

namespace Neoseeker.NAMFox.Tests.Interface
{
    [TestFixture]
    public class PrivateMessagePreferences : TestBase
    {
        [Test]
        [Issue(46)]
        public void Applies_Preferences_To_Delete_Post_Screen()
        {
            // Arrange
            Selenium.Login();
            Selenium.Configuration.ReadReceiptChecked = true;

            // Act
            Selenium.Open(Url.Forum("/index.php?fn=delete_message&m=19866471"));

            // Assert
            Assert.IsTrue(Selenium.IsChecked("read_rcpt"));
        }

        [Test]
        [Issue(46)]
        public void Applies_Preferences_To_Mass_Delete_Posts_Screen()
        {
            // Arrange
            Selenium.Login();
            Selenium.Configuration.ReadReceiptChecked = true;

            // Act
            Selenium.Open(Url.Forum("/index.php?fn=mass_message_change&t=1140539&p=3&mid_array[]=19866471&mid_array[]=19867748&do=Delete+Selected"));

            // Assert
            Assert.IsTrue(Selenium.IsChecked("read_rcpt"));
        }

        [Test]
        [Issue(92)]
        public void Applies_Preferences_On_PM_Forward()
        {
            // Arrange
            Selenium.Login();
            Selenium.Configuration.ReadReceiptChecked = true;

            // Act
            Selenium.Open(Url.Forum("/index.php?fn=view_pm_thread&pm_threadid=450586&mailbox=received"));

            // Assert
            Assert.IsTrue(Selenium.IsChecked("read_rcpt"));
        }

        [Test]
        [Issue(92)]
        public void Applies_Preferences_On_PM_Forward_And_Quoted_Reply()
        {
            // Arrange
            Selenium.Login();
            Selenium.Configuration.ReadReceiptChecked = true;

            // Act
            Selenium.Open(Url.Forum("/index.php?fn=view_pm_thread&pm_threadid=450586&mailbox=received"));

            // Assert
            Assert.IsTrue(Selenium.IsChecked("read_rcpt"));
        }
    }
}
